import 'package:sui_shou_pai/chat/entity/employee_model.dart';

class DepartmentModel {
  String departmentId;
  List<EmployeeModel> employeeList;

  static DepartmentModel formMap(String key, List<dynamic> employeeList) {
    DepartmentModel departmentModel = DepartmentModel();
    List<EmployeeModel> employeelist = [];
    departmentModel.departmentId = key;
    for (int i = 0; i < employeeList.length; i++) {
      EmployeeModel employee = EmployeeModel.formMap(employeeList[i]);
      employeelist.add(employee);
    }
    departmentModel.employeeList = employeelist;
    return departmentModel;
  }
}
